package com.fallsvc.api.pojo;

import com.fallsvc.api.pojo.request.AddBlogInfoRequest;
import com.fallsvc.api.pojo.request.UpBlogRequest;
import com.fallsvc.api.pojo.response.BlogInfoResponse;
import com.fallsvc.common.pojo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @auther falls_vc
 * description:
 * @date 2025/9/16  22:42
 */
@FeignClient(value = "blog-service",path = "/blog")
public interface BlogServiceApi {


    @RequestMapping("/getList")
    Result<List<BlogInfoResponse>> getList();

    @RequestMapping("/getBlogDetail")
    Result<BlogInfoResponse> getBlogDeatail(@RequestParam("blogId") Integer blogId);

    @RequestMapping("/add")
    Result<Boolean> addBlog(@RequestBody AddBlogInfoRequest addBlogInfoRequest);

    @RequestMapping("/update")
    Result<Boolean> updateBlog(@RequestBody UpBlogRequest upBlogRequest);

    @RequestMapping("/delete")
    Result<Boolean> deleteBlog(@RequestParam("blogId") Integer blogId);
}
